#include "waterMark.h"

bool WaterMark::process(){
	if (getOriginalImg()){
		if (getWaterMarkFromEmbededImg()){
			if (decodeWaterMark()){
				if (generateNewWaterMark()){
					if (embedNewWaterMark())
						cout << "process done, newEmbededImg is ready" << endl;
						return true;
				}
			}
		}
	}
	
	return false;

}

//step-1:get original image from search database or decode obvious info from embededImg
bool WaterMark::getOriginalImg(){	
	pair<AdContent*, bool> myPair =pAdData->searchAdContent(adId);
	if (!myPair.second)
		return false;
	originalImg = myPair.first->originalImg;
	originalDctImg = myPair.first->dctImg;
	return true;
}
//step-2:get water mark from embededImg using originalImg
bool WaterMark::getWaterMarkFromEmbededImg(){


}
//step-3:decode water mark
bool WaterMark::decodeWaterMark(){

}
//step-4:generate new water mark;
bool WaterMark::generateNewWaterMark(){

}
//step-5:return a new embededImg
bool WaterMark::embedNewWaterMark(){
	
	
}


